<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="text" value="" id="inp1">
    <input type="text" value=""  id="inp2">
    <button onclick="ssb()">22</button>
    <button>f22</button>


</body>
<script>
     var val1=document.getElementById('inp1')
     var val2=document.getElementById('inp2')
    function ssb(){
       alert(val1.value)
       alert(val2.value)
        
    }
</script>
</html>